<template>
  <div id="app">
    <router-view />
  </div>
</template>


<script>
import jwt from "jwt-decode";
export default {
  name: "login",
  created() {
    if (localStorage.milink) {
      const decode = jwt(localStorage.milink);
      this.$store.dispatch("setAuthenticated", decode);
      this.$store.dispatch("setUser", decode);
    }
  },
  methods: {
    isEmpty(value) {
      return (
        value == undefined ||
        value == null ||
        (typeof value == "object" && Object.keys(value).length === 0) ||
        (typeof value == "string" && value.trim().length === 0)
      );
    },
  },
};
</script>

<style lang="scss">
html,
body,
#app {
  margin: 0;
  padding: 0;
  width: 100%;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
